package com.apps.hello.clients;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * service-hello 调用 service-msg实现 ribbon负载均衡
 */
@Component
public class MsgServiceHystrix implements MsgService {


  @Override
  public String listMsg(String name) {
    return "listMsg sorry "+name;
  }

  @Override
  public String infoMsg(String name) {
    return "infoMsg sorry "+name;
  }
}
